﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Text;

using Ras2ClassLib;

namespace Ras2Web
{
    public partial class Songs : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Keyrir þegar síðan opnast 
            SetSource();        
        }


        protected void SetSource()
        {
            SongController ctrl = new SongController();
            m_gridSongs.DataSource = ctrl.GetAllSongs();
            m_gridSongs.DataBind();
        }
        //Keyrir þegar síðan opnast
        protected void m_gridSongs_IndexChanging(object sender, GridViewPageEventArgs e)
        {
            m_gridSongs.PageIndex = e.NewPageIndex;
            SetSource();
        }
    }
}
